-- @Author: 作者QQ201878826
-- @Date:   2021-10-29 16:43:54
-- @Last Modified by:   作者QQ381990860
-- @Last Modified time: 2022-09-12 19:56:28
-- @Author: 作者QQ201878826
-- @Date:   2021-10-29 16:43:54
-- @Last Modified by:   作者QQ201878826
-- @Last Modified time: 2021-10-31 01:31:18

function 道具处理类:脱下矿区(id, 格子, 类型,交换格子)--矿区系统

  数据 = {
    格子 = tonumber(格子),
    当前类型 = 类型,
    交换格子=tonumber(交换格子)
  }

      if 数据.交换格子~= nil then
            self.临时格子 = 数据.交换格子
      else
            self.临时格子=角色处理类:取可用道具格子(玩家数据[id],数据.当前类型)
      end
      if self.临时格子==0 then
        发送数据(玩家数据[id].连接id,7,"#Y/您的"..数据.当前类型.."已经无法存储更多的道具了")
        发送数据(玩家数据[id].连接id,3006,"66")
        return 0
      else
       玩家数据[id].角色.道具[数据.当前类型][self.临时格子]=玩家数据[id].角色.矿区[数据.格子]
       玩家数据[id].角色.矿区[数据.格子]=0
        角色处理类:刷新装备属性(玩家数据[id])
        self:索要矿区(id)
        发送数据(玩家数据[id].连接id,3006,"66")
        return 0
      end
end

function 道具处理类:佩戴矿区(id, 格子, 类型,交换格子)--矿区系统
  数据 = {
    格子 = tonumber(格子),
    当前类型 = 类型,
    交换格子=tonumber(交换格子)
  }

      self.道具编号=玩家数据[id].角色.道具[数据.当前类型][数据.格子]
      if 玩家数据[id].物品[self.道具编号] == nil then
          发送数据(玩家数据[id].连接id,7,"#Y/此道具不存在请刷新背包")
         return
      end

      self.道具部位=玩家数据[id].物品[self.道具编号].部位

      self.格子序号=0
      if self.道具部位=="一号" then
      self.格子序号=35
      elseif self.道具部位=="二号" then
      self.格子序号=36
      elseif self.道具部位=="三号" then
      self.格子序号=37
      elseif self.道具部位=="四号" then
      self.格子序号=38
      elseif self.道具部位=="五号" then
      self.格子序号=39
      elseif self.道具部位=="六号" then
      self.格子序号=40
      elseif self.道具部位=="七号" then
      self.格子序号=41
      elseif self.道具部位=="八号" then
      self.格子序号=42
      elseif self.道具部位=="九号" then
      self.格子序号=43
      elseif self.道具部位=="十号" then
      self.格子序号=44
      elseif self.道具部位=="十一号" then
      self.格子序号=45
      elseif self.道具部位=="十二号" then
      self.格子序号=46
      elseif self.道具部位=="十三号" then
      self.格子序号=47
      elseif self.道具部位=="十四号" then
      self.格子序号=48
      elseif self.道具部位=="十五号" then
      self.格子序号=49
      elseif self.道具部位=="十六号" then
      self.格子序号=50
      elseif self.道具部位=="十七号" then
      self.格子序号=51
      elseif self.道具部位=="十八号" then
      self.格子序号=52
      elseif self.道具部位=="十九号" then
      self.格子序号=53
      elseif self.道具部位=="二拾号" then
      self.格子序号=54
      elseif self.道具部位=="二拾一号" then
      self.格子序号=55
      elseif self.道具部位=="二拾二号" then
      self.格子序号=56
      elseif self.道具部位=="二拾三号" then
      self.格子序号=57
      elseif self.道具部位=="二拾四号" then
      self.格子序号=58
      elseif self.道具部位=="二拾五号" then
      self.格子序号=59
      elseif self.道具部位=="二拾六号" then
      self.格子序号=60
      elseif self.道具部位=="二拾七号" then
      self.格子序号=61
      elseif self.道具部位=="二拾八号" then
      self.格子序号=62
      elseif self.道具部位=="二拾九号" then
      self.格子序号=63
      elseif self.道具部位=="三拾号" then
      self.格子序号=64
      elseif self.道具部位=="三拾一号" then
      self.格子序号=65
      elseif self.道具部位=="三拾二号" then
      self.格子序号=66
      elseif self.道具部位=="三拾三号" then
      self.格子序号=67
      elseif self.道具部位=="三拾四号" then
      self.格子序号=68
      elseif self.道具部位=="三拾五号" then
      self.格子序号=69
      elseif self.道具部位=="三拾六号" then
      self.格子序号=70
      elseif self.道具部位=="三拾七号" then
      self.格子序号=71
      elseif self.道具部位=="三拾八号" then
      self.格子序号=72
      elseif self.道具部位=="三拾九号" then
      self.格子序号=73
      elseif self.道具部位=="四拾号" then
      self.格子序号=74

      end

      if self.格子序号==0 then
          发送数据(玩家数据[id].连接id,7,"#Y/此道具无法佩戴")
          发送数据(玩家数据[id].连接id,3006,"66")
          return 0
      else

                  if 玩家数据[id].角色.矿区[ self.格子序号]~=0 then
                     玩家数据[id].角色.道具[数据.当前类型][数据.格子]=玩家数据[id].角色.矿区[ self.格子序号]
                  else
                       玩家数据[id].角色.道具[数据.当前类型][数据.格子]=nil
                  end
                  玩家数据[id].角色.矿区[ self.格子序号]=self.道具编号
                    角色处理类:刷新装备属性(玩家数据[id])

                     self:索要矿区(id)
                    发送数据(玩家数据[id].连接id,3006,"66")
      end
 end


function 道具处理类:索要矿区(id)--矿区系统
 self.发送信息={}
   for n=35,74 do
     if 玩家数据[id].角色.矿区[n]~=0 then
        self.发送信息[n]=table.loadstring(table.tostring(玩家数据[id].物品[玩家数据[id].角色.矿区[n]]))
     else
        self.发送信息[n]=0
     end
   end
    激活信息=false
    套装激活=false
    矿区门派={"大唐官府","化生寺","女儿村","方寸山","天宫","龙宫","五庄观","普陀山","魔王寨","狮驼岭","盘丝洞","阴曹地府","凌波城","无底洞","神木林","花果山","天机城","女魃墓"}
    矿区颜色={"银曜石","绿翡翠","蓝色宝石","紫水晶","红碧玺","黄金"}
    for i=1,#矿区门派 do
        if  (玩家数据[id].角色.矿区[35]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[35]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[36]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[36]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[37]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[37]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[38]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[38]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[39]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[39]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[40]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[40]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[41]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[41]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[42]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[42]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[43]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[43]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[44]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[44]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[45]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[45]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[46]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[46]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[47]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[47]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[48]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[48]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[49]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[49]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[50]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[50]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[51]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[51]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[52]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[52]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[53]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[53]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[54]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[54]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[55]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[55]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[56]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[56]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[57]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[57]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[58]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[58]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[59]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[59]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[60]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[60]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[61]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[61]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[62]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[62]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[63]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[63]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[64]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[64]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[65]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[65]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[66]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[66]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[67]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[67]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[68]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[68]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[69]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[69]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[70]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[70]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[71]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[71]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[72]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[72]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[73]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[73]].门派 == 矿区门派[i]) and
            (玩家数据[id].角色.矿区[74]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[74]].门派 == 矿区门派[i]) then
            for n=1,#矿区颜色 do
                if  玩家数据[id].物品[玩家数据[id].角色.矿区[35]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[36]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[37]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[38]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[39]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[40]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[41]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[42]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[43]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[44]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[45]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[46]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[47]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[48]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[49]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[50]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[51]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[52]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[53]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[54]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[55]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[56]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[57]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[58]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[59]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[60]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[61]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[62]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[63]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[64]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[65]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[66]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[67]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[68]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[69]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[70]].名称 == 矿区颜色[n] and
                     玩家数据[id].物品[玩家数据[id].角色.矿区[71]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[72]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[73]].名称 == 矿区颜色[n] and
                    玩家数据[id].物品[玩家数据[id].角色.矿区[74]].名称 == 矿区颜色[n] then

                    玩家数据[id].角色.矿区[75]=矿区门派[i]
                    玩家数据[id].角色.矿区套.门派=矿区门派[i]
                    玩家数据[id].角色.矿区套.等级=n
                    -- 套装激活=true
                    -- if not 激活信息 then
                    --    发送数据(玩家数据[id].连接id, 7, "#y/恭喜少侠激活"..矿区门派[i].."套装，套装品质:"..矿区颜色[n])
                    --    激活信息=true
                    -- end
                end
            end
        end
    end
       -- if not 套装激活 then
       --   玩家数据[id].角色.矿区[75]=0
       --   玩家数据[id].角色.矿区套.门派="无门派"
       --   玩家数据[id].角色.矿区套.等级=1
       --   if 激活信息 then
       --     发送数据(玩家数据[id].连接id, 7, "#y/矿区套装效果消失了")
       --     激活信息=false
       --   end
       -- end
       -- self.发送信息[75]=玩家数据[id].角色.矿区[75]
       发送数据(玩家数据[id].连接id,192317,self.发送信息)
  end

function 道具处理类:索要矿区套(id)--矿区系统
    道具编号=玩家数据[id].角色.矿区[35]
    矿区门派={"大唐官府","化生寺","女儿村","方寸山","天宫","龙宫","五庄观","普陀山","魔王寨","狮驼岭","盘丝洞","阴曹地府","凌波城","无底洞","神木林","花果山","天机城","女魃墓"}
    矿区颜色={"银曜石","绿翡翠","蓝色宝石","紫水晶","红碧玺","黄金"}
    for i=1,#矿区门派 do
        if  (玩家数据[id].角色.矿区[35]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[35]].门派 == i) and
            (玩家数据[id].角色.矿区[36]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[36]].门派 == i) and
            (玩家数据[id].角色.矿区[37]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[37]].门派 == i) and
            (玩家数据[id].角色.矿区[38]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[38]].门派 == i) and
            (玩家数据[id].角色.矿区[39]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[39]].门派 == i) and
            (玩家数据[id].角色.矿区[40]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[40]].门派 == i) and
            (玩家数据[id].角色.矿区[41]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[41]].门派 == i) and
            (玩家数据[id].角色.矿区[42]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[42]].门派 == i) and
            (玩家数据[id].角色.矿区[43]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[43]].门派 == i) and
            (玩家数据[id].角色.矿区[44]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[44]].门派 == i) and
            (玩家数据[id].角色.矿区[45]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[45]].门派 == i) and
            (玩家数据[id].角色.矿区[46]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[46]].门派 == i) and
            (玩家数据[id].角色.矿区[47]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[47]].门派 == i) and
            (玩家数据[id].角色.矿区[48]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[48]].门派 == i) and
            (玩家数据[id].角色.矿区[49]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[49]].门派 == i) and
            (玩家数据[id].角色.矿区[50]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[50]].门派 == i) and
            (玩家数据[id].角色.矿区[51]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[51]].门派 == i) and
            (玩家数据[id].角色.矿区[52]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[52]].门派 == i) and
            (玩家数据[id].角色.矿区[53]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[53]].门派 == i) and
            (玩家数据[id].角色.矿区[54]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[54]].门派 == i) and
            (玩家数据[id].角色.矿区[55]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[55]].门派 == i) and
            (玩家数据[id].角色.矿区[56]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[56]].门派 == i) and
            (玩家数据[id].角色.矿区[57]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[57]].门派 == i) and
            (玩家数据[id].角色.矿区[58]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[58]].门派 == i) and
            (玩家数据[id].角色.矿区[59]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[59]].门派 == i) and
            (玩家数据[id].角色.矿区[60]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[60]].门派 == i) and
            (玩家数据[id].角色.矿区[61]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[61]].门派 == i) and
            (玩家数据[id].角色.矿区[62]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[62]].门派 == i) and
            (玩家数据[id].角色.矿区[63]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[63]].门派 == i) and
            (玩家数据[id].角色.矿区[64]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[64]].门派 == i) and
            (玩家数据[id].角色.矿区[65]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[65]].门派 == i) and
            (玩家数据[id].角色.矿区[66]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[66]].门派 == i) and
            (玩家数据[id].角色.矿区[67]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[67]].门派 == i) and
            (玩家数据[id].角色.矿区[68]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[68]].门派 == i) and
            (玩家数据[id].角色.矿区[69]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[69]].门派 == i) and
            (玩家数据[id].角色.矿区[70]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[70]].门派 == i) and
            (玩家数据[id].角色.矿区[71]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[71]].门派 == i) and
            (玩家数据[id].角色.矿区[72]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[72]].门派 == i) and
            (玩家数据[id].角色.矿区[73]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[73]].门派 == i) and
            (玩家数据[id].角色.矿区[74]~=0 and 玩家数据[id].物品[玩家数据[id].角色.矿区[74]].门派 == i) then

             玩家数据[id].角色.矿区[75]=1

        end
    end

end


 function 道具处理类:矿区升级(id, 格子, 类型)--矿区系统
     道具编号=玩家数据[id].角色.矿区[格子]

     if 玩家数据[id].物品[道具编号].等级 == 40 then
        发送数据(玩家数据[id].连接id,7,"#Y/少侠你的矿区已提升至最高等级")
        return 0
     end

     if (玩家数据[id].物品[道具编号].等级==40 and 玩家数据[id].物品[道具编号].突破==0) or (玩家数据[id].物品[道具编号].等级 == 20 and 玩家数据[id].物品[道具编号].突破==1) or (玩家数据[id].物品[道具编号].等级 == 30 and 玩家数据[id].物品[道具编号].突破==2) then
        发送数据(玩家数据[id].连接id,7,"#Y/少侠你的矿区需要完成突破才可以继续升级")
     else

        local gz = 道具处理类:寻找道具(玩家数据[id],{"矿区升级石"})
        if #gz ~= 1 then
        发送数据(玩家数据[id].连接id, 7, "#y/背包需要有矿区升级石才可以升级")
        else
          if 玩家数据[id].物品[玩家数据[id].角色.道具.包裹[gz[1]]].数量 >= 玩家数据[id].物品[道具编号].等级 then
            玩家数据[id].物品[道具编号].等级=玩家数据[id].物品[道具编号].等级+1
            玩家数据[id].物品[道具编号].强化=true
            道具处理类:RemoveItems(玩家数据[id],gz[1],"矿区升级石",玩家数据[id].物品[道具编号].等级-1)
            发送数据(玩家数据[id].连接id, 7, "#y/升级成功")
          else
            发送数据(玩家数据[id].连接id, 7, "#y/升级矿区需要"..玩家数据[id].物品[道具编号].等级.."个矿区升级石")
          end
        end
     end
     角色处理类:刷新装备属性(玩家数据[id])
     self:索要矿区(id)
     发送数据(玩家数据[id].连接id,3006,"66")
 end



 function 道具处理类:矿区洗练(id, 格子, 类型)--矿区系统

       一号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       二号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       三号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       四号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       五号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       六号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       七号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       八号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       九号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       十号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
       十一号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十二号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十三号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十四号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十五号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十六号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十七号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十八号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     十九号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾一号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾二号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾三号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾四号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾五号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾六号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾七号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾八号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     二拾九号范围 ={"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾一号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾二号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾三号范围 = {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾四号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾五号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾六号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾七号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾八号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     三拾九号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
     四拾号范围 =  {"伤害","命中","狂暴等级","穿刺等级","封印命中等级","灵力","固定伤害","法术伤害","法术伤害结果","魔法","气血","防御","法术防御","抗物理暴击等级","抗法术暴击等级","抵抗封印等级","格挡值","速度","气血回复效果","治疗能力","力量","敏捷","魔力","体质","耐力"}
      矿区数值 = {
     封印命中等级={1,3},抵抗封印等级={1,3},防御={5,10},气血回复效果={6,18},气血={30,80}
    ,抗法术暴击等级={1,3},格挡值={3,8},法术防御={5,10},抗物理暴击等级={1,3},速度={5,10}
    ,法术伤害={5,10},伤害={5,10},固定伤害={10,20},法术伤害={5,10},法术暴击等级={1,3},物理暴击等级={1,3}
    ,狂暴等级={3,8},穿刺等级={3,8},法术伤害结果={5,10},治疗能力={10,30},魔法={20,30},躲避={5,10},灵力={5,10}
    ,命中={10,20},力量={5,10},敏捷={5,10},魔力={5,10},体质={5,10},耐力={5,10}   }
     道具编号=玩家数据[id].角色.矿区[格子]
     local gz = 道具处理类:寻找道具(玩家数据[id],{"矿区洗练石"})
        if #gz ~= 1 then
        发送数据(玩家数据[id].连接id, 7, "#y/背包需要有矿区洗练石")
        else
         洗练类型=玩家数据[id].物品[道具编号].固定类型
         玩家数据[id].物品[道具编号].固定属性=math.random(矿区数值[洗练类型][1],矿区数值[洗练类型][2])
         for i=1,7 do
             if 玩家数据[id].物品[道具编号].矿区属性[i] ~= nil then
                if 玩家数据[id].物品[道具编号].部位 == "一号" then
                   附加类型=一号范围[math.random(1,#一号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二号" then
                   附加类型=二号范围[math.random(1,#二号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三号" then
                   附加类型=三号范围[math.random(1,#三号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "四号" then
                   附加类型=四号范围[math.random(1,#四号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "五号" then
                   附加类型=五号范围[math.random(1,#五号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "六号" then
                   附加类型=六号范围[math.random(1,#六号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "七号" then
                   附加类型=七号范围[math.random(1,#七号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "八号" then
                   附加类型=八号范围[math.random(1,#八号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "九号" then
                   附加类型=九号范围[math.random(1,#九号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十号" then
                   附加类型=十号范围[math.random(1,#十号范围)]
                 elseif 玩家数据[id].物品[道具编号].部位 == "十一号" then
                   附加类型=十一号范围[math.random(1,#十一号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十二号" then
                   附加类型=十二号范围[math.random(1,#十二号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三号" then
                   附加类型=十三号范围[math.random(1,#十三号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十四号" then
                   附加类型=十四号范围[math.random(1,#十四号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十五号" then
                   附加类型=十五号范围[math.random(1,#十五号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十六号" then
                   附加类型=十六号范围[math.random(1,#十六号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十七号" then
                   附加类型=十七号范围[math.random(1,#七号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "十八号" then
                   附加类型=十八号范围[math.random(1,#十八号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "十九号" then
                   附加类型=十九号范围[math.random(1,#十九号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾号" then
                   附加类型=二拾号范围[math.random(1,#二拾号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "二拾一号" then
                   附加类型=二拾一号范围[math.random(1,#二拾一号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾二号" then
                   附加类型=二拾二号范围[math.random(1,#二拾二号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾三号" then
                   附加类型=二拾三号范围[math.random(1,#二拾三号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾四号" then
                   附加类型=二拾四号范围[math.random(1,#二拾四号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾五号" then
                   附加类型=二拾五号范围[math.random(1,#二拾五号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾六号" then
                   附加类型=二拾六号范围[math.random(1,#二拾六号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾七号" then
                   附加类型=二拾七号范围[math.random(1,#二拾七号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "二拾八号" then
                   附加类型=二拾八号范围[math.random(1,#二拾八号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "二拾九号" then
                   附加类型=二拾九号范围[math.random(1,#二拾九号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾号" then
                   附加类型=三拾号范围[math.random(1,#三拾号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "三拾一号" then
                   附加类型=三拾一号范围[math.random(1,#三拾一号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾二号" then
                   附加类型=三拾二号范围[math.random(1,#三拾二号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾三号" then
                   附加类型=三拾三号范围[math.random(1,#三拾三号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾四号" then
                   附加类型=三拾四号范围[math.random(1,#三拾四号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾五号" then
                   附加类型=三拾五号范围[math.random(1,#三拾五号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾六号" then
                   附加类型=三拾六号范围[math.random(1,#三拾六号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾七号" then
                   附加类型=三拾七号范围[math.random(1,#三拾七号范围)]
                elseif 玩家数据[id].物品[道具编号].部位 == "三拾八号" then
                   附加类型=三拾八号范围[math.random(1,#三拾八号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "三拾九号" then
                   附加类型=三拾九号范围[math.random(1,#三拾九号范围)]
               elseif 玩家数据[id].物品[道具编号].部位 == "四拾号" then
                   附加类型=四拾号范围[math.random(1,#四拾号范围)]

                end
                玩家数据[id].物品[道具编号].矿区属性[i].类型=附加类型
                玩家数据[id].物品[道具编号].矿区属性[i].数值=math.random(矿区数值[附加类型][1],矿区数值[附加类型][2])
             end
         end
         道具处理类:RemoveItems(玩家数据[id],gz[1],"矿区洗练石")
         发送数据(玩家数据[id].连接id, 7, "#y/洗练成功")
        end
        角色处理类:刷新装备属性(玩家数据[id])
        self:索要矿区(id)
        发送数据(玩家数据[id].连接id,3006,"66")
 end


 function 道具处理类:矿区突破(id, 格子, 类型)--矿区系统
     道具编号=玩家数据[id].角色.矿区[格子]
     if 玩家数据[id].物品[道具编号].突破 == 3 then
        发送数据(玩家数据[id].连接id,7,"#Y/少侠你的矿区已突破圆满")
        return 0
     end

     if (玩家数据[id].物品[道具编号].等级==10 and 玩家数据[id].物品[道具编号].突破==0) or (玩家数据[id].物品[道具编号].等级 == 20 and 玩家数据[id].物品[道具编号].突破==1) or (玩家数据[id].物品[道具编号].等级 == 30 and 玩家数据[id].物品[道具编号].突破==2) then
        local gz = 道具处理类:寻找道具(玩家数据[id],{"矿区突破石"})
        if #gz ~= 1 then
        发送数据(玩家数据[id].连接id, 7, "#y/背包需要有矿区突破石才可以突破")
        else
            -- if 玩家数据[id].物品[道具编号].名称=="绿色矿区" then
            --    玩家数据[id].物品[道具编号].名称="蓝色矿区"

            --    玩家数据[id].物品[道具编号].矿区属性={[1]={类型=玩家数据[id].物品[道具编号].矿区属性[1].类型,数值=玩家数据[id].物品[道具编号].矿区属性[1].数值},[2]={类型=玩家数据[id].物品[道具编号].矿区属性[2].类型,数值=玩家数据[id].物品[道具编号].矿区属性[2].数值},[3]={类型="抵抗封印等级",数值=5}}
            -- elseif 玩家数据[id].物品[道具编号].名称=="蓝色矿区" then
            --    玩家数据[id].物品[道具编号].名称="紫色矿区"

            --    玩家数据[id].物品[道具编号].矿区属性={[1]={类型=玩家数据[id].物品[道具编号].矿区属性[1].类型,数值=玩家数据[id].物品[道具编号].矿区属性[1].数值},[2]={类型=玩家数据[id].物品[道具编号].矿区属性[2].类型,数值=玩家数据[id].物品[道具编号].矿区属性[2].数值},[3]={类型=玩家数据[id].物品[道具编号].矿区属性[3].类型,数值=玩家数据[id].物品[道具编号].矿区属性[3].数值},[4]={类型="魔法",数值=35}}
            -- elseif 玩家数据[id].物品[道具编号].名称=="紫色矿区" then
            --    玩家数据[id].物品[道具编号].名称="红色矿区"

            --    玩家数据[id].物品[道具编号].矿区属性={[1]={类型=玩家数据[id].物品[道具编号].矿区属性[1].类型,数值=玩家数据[id].物品[道具编号].矿区属性[1].数值},[2]={类型=玩家数据[id].物品[道具编号].矿区属性[2].类型,数值=玩家数据[id].物品[道具编号].矿区属性[2].数值},[3]={类型=玩家数据[id].物品[道具编号].矿区属性[3].类型,数值=玩家数据[id].物品[道具编号].矿区属性[3].数值},[4]={类型=玩家数据[id].物品[道具编号].矿区属性[4].类型,数值=玩家数据[id].物品[道具编号].矿区属性[4].数值},[5]={类型="气血回复效果",数值=6}}
            -- end
            玩家数据[id].物品[道具编号].突破=玩家数据[id].物品[道具编号].突破+1
        道具处理类:RemoveItems(玩家数据[id],gz[1],"矿区突破石")
        发送数据(玩家数据[id].连接id, 7, "#y/突破成功")
        end
     else
        发送数据(玩家数据[id].连接id,7,"#Y/少侠你的矿区达到10级、20级、30级可突破一次")
     end
     角色处理类:刷新装备属性(玩家数据[id])
     self:索要矿区(id)
     发送数据(玩家数据[id].连接id,3006,"66")
 end